package com.daydayup.learn;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.Expression;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;

@SpringBootApplication
@MapperScan("com.daydayup.learn.mapper")
public class AppStart {

    public static void main(String[] args) {
        SpringApplication.run(AppStart.class, args);
        System.out.println("启动成功......");
        String var = "#userid";
        SpelExpressionParser spelExpressionParser = new SpelExpressionParser();
        Expression expression = spelExpressionParser.parseExpression(var);

        EvaluationContext context = new StandardEvaluationContext();
        context.setVariable("userid","erwwerewasdsdasd");
        String s = expression.getValue(context).toString();
        System.out.println(s);
    }
}


